Instead, make the functions use a GtkStyleContext argument.
#include "gtkcsscornervalueprivate.h"
#include "gtkcsstypesprivate.h"
#include "gtkstylecontextprivate.h"
-#include "gtkthemingengineprivate.h"
#include <string.h>
}
void
-_gtk_rounded_box_apply_border_radius_for_engine (GtkRoundedBox *box,
- GtkThemingEngine *engine,
- GtkJunctionSides junction)
-{
- _gtk_rounded_box_apply_border_radius_for_context (box, _gtk_theming_engine_get_context (engine), junction);
-}
-
-void
-_gtk_rounded_box_apply_outline_radius_for_engine (GtkRoundedBox *box,
- GtkThemingEngine *engine,
- GtkJunctionSides junction)
+_gtk_rounded_box_apply_outline_radius_for_context (GtkRoundedBox *box,
+ GtkStyleContext *context,
+ GtkJunctionSides junction)
{
GtkCssValue *corner[4];
- corner[GTK_CSS_TOP_LEFT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS);
- corner[GTK_CSS_TOP_RIGHT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS);
- corner[GTK_CSS_BOTTOM_LEFT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS);
- corner[GTK_CSS_BOTTOM_RIGHT] = _gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS);
+ corner[GTK_CSS_TOP_LEFT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS);
+ corner[GTK_CSS_TOP_RIGHT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS);
+ corner[GTK_CSS_BOTTOM_LEFT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS);
+ corner[GTK_CSS_BOTTOM_RIGHT] = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS);
_gtk_rounded_box_apply_border_radius (box, corner, junction);
}
#include <glib-object.h>
#include <cairo.h>
#include <gtk/gtkenums.h>
-#include <gtk/gtkthemingengine.h>
+#include <gtk/gtktypes.h>
#include "gtkcsstypesprivate.h"
double width,
double height);
-void _gtk_rounded_box_apply_border_radius_for_engine (GtkRoundedBox *box,
- GtkThemingEngine *engine,
+void _gtk_rounded_box_apply_border_radius_for_context (GtkRoundedBox *box,
+ GtkStyleContext *context,
GtkJunctionSides junction);
-void _gtk_rounded_box_apply_border_radius_for_context (GtkRoundedBox *box,
- GtkStyleContext *context,
- GtkJunctionSides junction);
-void _gtk_rounded_box_apply_outline_radius_for_engine (GtkRoundedBox *box,
- GtkThemingEngine *engine,
- GtkJunctionSides junction);
+void _gtk_rounded_box_apply_outline_radius_for_context (GtkRoundedBox *box,
+ GtkStyleContext *context,
+ GtkJunctionSides junction);
void _gtk_rounded_box_grow (GtkRoundedBox *box,
double top,
colors[3] = *_gtk_css_rgba_value_get_rgba (_gtk_theming_engine_peek_property (engine, GTK_CSS_PROPERTY_BORDER_LEFT_COLOR));
_gtk_rounded_box_init_rect (&border_box, x, y, width, height);
- _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, junction);
+ _gtk_rounded_box_apply_border_radius_for_context (&border_box, engine->priv->context, junction);
render_border (cr, &border_box, border_width, hidden_side, colors, border_style);
}
- border_width[GTK_CSS_RIGHT] - offset,
- border_width[GTK_CSS_LEFT] - offset,
- border_width[GTK_CSS_BOTTOM] - offset);
- _gtk_rounded_box_apply_outline_radius_for_engine (&border_box, engine, GTK_JUNCTION_NONE);
+ _gtk_rounded_box_apply_outline_radius_for_context (&border_box, engine->priv->context, GTK_JUNCTION_NONE);
render_border (cr, &border_box, border_width, 0, colors, border_style);
}